<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <link href="/layui/css/layui.css" rel="stylesheet">
</head>
<body>

<h1>主页</h1>
<button type="button" class="layui-btn" id="add">添加按钮</button>
<button type="button" class="layui-btn" id="delete">删除按钮</button>
<button type="button" class="layui-btn" id="edit">修改按钮</button>

<script src="/layui/layui.js"></script>

<script>
    layui.use(function (){
        let $ = layui.jquery;

        $("#add").on("click",function (){
            $.get("/user/add",function (res){
                    layer.msg(res.message)
            })
        })

        $("#delete").on("click",function (){
            $.get("/user/delete",function (res){
                layer.msg(res.message)
            })
        })

        $("#edit").on("click",function (){
            $.get("/user/update",function (res){
                layer.msg(res.message)
            })
        })
    })
</script>

</body>
</html>